﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Public;

namespace DAL
{
    public class TrinhDoDAL
    {
        public static List<TrinhDoPublic> LoadTrinhDo()
        {
            var trinhdo = Common.db.ExecuteStoreQuery<TrinhDoPublic>(@"select * from TrinhDo");
            return trinhdo.ToList();
        }
        public static TrinhDoPublic GetTrinhDoByMaTD(int MaTD)
        {
            var trinhdo = Common.db.ExecuteStoreQuery<TrinhDoPublic>(@"select TenTrinhDo from TrinhDo where MaTD=" + MaTD);
            return trinhdo.FirstOrDefault();
        }
    }
}
